<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Examples</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<link href="" rel="stylesheet">
	<script>
		window.onload=function (argument) {
			var txt1 = document.getElementById('txt1');
			var btn = document.getElementById('btn');
			var txt2 = document.getElementById('txt2');

			btn.onclick=function(){
				// var re = /<.+>/g;  // . 任意字符
				var re = /<[^<>]+>/g;

				txt2.value=txt1.value.replace(re,'');
			}
		}
	</script>
</head>
<body>
	<textarea name="" id="txt1" cols="30" rows="10"></textarea><br/>
  <input type="button" id="btn" value="过滤"><br/>
  <textarea name="" id="txt2" cols="30" rows="10"></textarea><br/>

  <table border="1px soild red">
  	<tr>
  		<td>/d</td>
  		<td>数字</td>
  		<td>[0-9]</td>
  	</tr>
  	<tr>
  		<td>\w</td>
  		<td>英文 数字 下划线</td>
  		<td>[a-z0-9 _]</td>
  	</tr>
  	<tr>
  		<td>/s</td>
  		<td>空白字符</td>
  		<td> </td>
  	</tr>
  	<tr>
  		<td>\D</td>
  		<td>除了0-9</td>
  		<td>[^0-9]</td>
  	</tr>
  	<tr>
  		<td>\W</td>
  		<td>除了英文 数字 下划线</td>
  		<td>[^a-z0-9_]</td>
  	</tr>
  	<tr>
  		<td>\S</td>
  		<td>\除了空白字符</td>
  		<td> </td>
  	</tr>
  	<tr>
  		<td colspan="3"> . 全部字符</td>
  	</tr>
  </table>
</body>
</html>